package io.gitee.chearnee.fw.common.entity;

import io.gitee.chearnee.fw.common.model.IBaseTree;
import lombok.*;
import lombok.experimental.FieldDefaults;

import java.util.List;

/**
 * 结构 示例
 *
 * @author cn
 * @version 1.0
 * @description
 * @date 2022/4/6 17:48
 */
@Getter
@Setter
@EqualsAndHashCode
@ToString(callSuper = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
public class BaseTree implements IBaseTree<BaseTree, String> {

  String code;
  String parentCode;
  String name;
  List<BaseTree> children;

  @Override
  public String getNodeCode() {
    return code;
  }

  @Override
  public String getParentNodeCode() {
    return parentCode;
  }

  @Override
  public List<BaseTree> getNodeChildren() {
    return children;
  }

  @Override
  public void setNodeChildren(List<BaseTree> children) {
    this.children = children;
  }
}
